<script setup>
import { useIndexStore } from '@/store/main';
import PcSearch from "./main/pc-search.vue";
import PcMainSearch from "./main/pc-main-search.vue";
import PcMainMenu from "./main/pc-main-menu.vue";
import {useRoute, useRouter} from "vue-router";
import PcMainLinkman from "@/components/pc/main/pc-main-linkman.vue";
import PcMainVideo from "@/components/pc/main/pc-main-video.vue";
import pcMainSpace from './pc-main-space.vue';

const route = useRoute()
console.log(route)

const indexStore = useIndexStore()
</script>

<template>
  <div class="h-svh">
    <div class="h-[5%] p-5 flex">
      <pc-search />
    </div>
    <div class="h-[95%] overflow-hidden">
      <el-scrollbar>
        <pc-main-search v-if="indexStore.search_page"/>
        <pc-main-menu v-else-if="route.path.startsWith('/home/message') "/>
        <pc-main-linkman v-else-if="route.path.startsWith('/home/linkman') "/>
        <pc-main-video v-else-if="route.path.startsWith('/home/video') "/>
        <pc-main-space v-else-if="route.path.startsWith('/home/space') "/>
      </el-scrollbar>
    </div>
  </div>
</template>

<style scoped>

</style>